package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.ZhwyRuleMapper;
import com.ruoyi.domain.ZhwyRule;
import com.ruoyi.service.IZhwyRuleService;

/**
 * 停车场计费规则Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-07
 */
@Service
public class ZhwyRuleServiceImpl implements IZhwyRuleService 
{
    @Autowired
    private ZhwyRuleMapper zhwyRuleMapper;

    /**
     * 查询停车场计费规则
     * 
     * @param id 停车场计费规则主键
     * @return 停车场计费规则
     */
    @Override
    public ZhwyRule selectZhwyRuleById(Long id)
    {
        return zhwyRuleMapper.selectZhwyRuleById(id);
    }

    /**
     * 查询停车场计费规则列表
     * 
     * @param zhwyRule 停车场计费规则
     * @return 停车场计费规则
     */
    @Override
    public List<ZhwyRule> selectZhwyRuleList(ZhwyRule zhwyRule)
    {
        return zhwyRuleMapper.selectZhwyRuleList(zhwyRule);
    }

    /**
     * 新增停车场计费规则
     * 
     * @param zhwyRule 停车场计费规则
     * @return 结果
     */
    @Override
    public int insertZhwyRule(ZhwyRule zhwyRule)
    {
        return zhwyRuleMapper.insertZhwyRule(zhwyRule);
    }

    /**
     * 修改停车场计费规则
     * 
     * @param zhwyRule 停车场计费规则
     * @return 结果
     */
    @Override
    public int updateZhwyRule(ZhwyRule zhwyRule)
    {
        return zhwyRuleMapper.updateZhwyRule(zhwyRule);
    }

    /**
     * 批量删除停车场计费规则
     * 
     * @param ids 需要删除的停车场计费规则主键
     * @return 结果
     */
    @Override
    public int deleteZhwyRuleByIds(Long[] ids)
    {
        return zhwyRuleMapper.deleteZhwyRuleByIds(ids);
    }

    /**
     * 删除停车场计费规则信息
     * 
     * @param id 停车场计费规则主键
     * @return 结果
     */
    @Override
    public int deleteZhwyRuleById(Long id)
    {
        return zhwyRuleMapper.deleteZhwyRuleById(id);
    }
}
